<?php
require_once 'connect.php';

if (isset($_POST) && isset($_POST['gameName']) && isset($_POST['count'])) {
	$gameName = $_POST['gameName'];
	$count = $_POST['count'];
	connect();
	$result = updateFavoritesCount($gameName, $count);

	if($result) {
		echo 'true';
	} else {
		echo 'Error updating ratings';
	}
} else {
	echo 'Unable to update';
}
?>	